package LeetCode;
import java.util.*;
public class LeetCodeMain23{

    public static void main(String[] args) throws NullPointerException{
        Scanner in = new Scanner(System.in);
        String str1=in.nextLine();
        String str2="";
        StringBuffer builder=new StringBuffer();
        for(int i=0;i<str1.length();i++){
            char ch=str1.charAt(i);
            if(ch>='0'&&ch<='9'){
                builder.append(ch);
            }else{
                if(str2.length()<builder.length()){
                    str2=builder.toString();
                    System.out.println(builder.toString());
                }
                int size=builder.length();
                    builder.delete(0,1);

            }
        }
        if(builder.length()>str2.length()){
            str2=builder.toString();
        }
        System.out.println(str2.toString());
    }
}
